package com.alibaba.dubbo.demo.provider;

import com.alibaba.dubbo.common.extension.ExtensionLoader;

/**
 * dubbo动态生成的代码,入口是
 * org.apache.dubbo.common.extension.ExtensionLoader#createAdaptiveExtensionClass
 */
public class Car$Adpative implements com.alibaba.dubbo.demo.provider.Car {
    public java.lang.String color(com.alibaba.dubbo.common.URL arg0) {
        if (arg0 == null) throw new IllegalArgumentException("url == null");
        com.alibaba.dubbo.common.URL url = arg0;
        String extName = url.getParameter("car", "baoma");
        if (extName == null)
            throw new IllegalStateException("Fail to get extension(com.alibaba.dubbo.demo.provider.Car) name from url(" + url.toString() + ") use keys([car])");
        com.alibaba.dubbo.demo.provider.Car extension = (com.alibaba.dubbo.demo.provider.Car) ExtensionLoader.getExtensionLoader(com.alibaba.dubbo.demo.provider.Car.class).getExtension(extName);
        return extension.color(arg0);
    }
}